#ifndef __G_INPUT_H__
#define __G_INPUT_H__

#include <string>

#include "GInputDefinitions.h"

namespace GEngine
{
	enum GInputState
	{
		G_IS_PRESSED	= 0,
		G_IS_PRESSING	= 1,
		G_IS_RELEASED	= 2,
	};

	enum GInputType
	{
		G_IT_BUTTON		= 0,
		G_IT_AXIS		= 1,
		G_IT_VALUE		= 2,
		G_IT_VECTOR		= 3,
		G_IT_QUATERNION = 4,
	};

	union GInputSemantic
	{
		GMouseSemantics		Mouse;
		GKeyboardSemantics	Keyboard;
		GJoyStickSemantics	Joystick;
		GGamepadSemantics	GamePad;
		GTouchSemantics		Touch;

		GInputSemantic(){}
		GInputSemantic(GMouseSemantics Semantic)	: Mouse(Semantic) {}
		GInputSemantic(GKeyboardSemantics Semantic) : Keyboard(Semantic){}
		GInputSemantic(GJoyStickSemantics Semantic) : Joystick(Semantic){}
		GInputSemantic(GGamepadSemantics Semantic)	: GamePad(Semantic){}
		GInputSemantic(GTouchSemantics Semantic)	: Touch(Semantic){}
	};

	class GInputDevice;

	class GInput
	{
	protected:
		GInputDevice*		Device;
		GInputSemantic		Semantic;
		GInputState			State;
		GInputType			Type;
	
	public:
							GInput();
							GInput(const char* Device, GInputSemantic Semantic, GInputState State, GInputType Type);
							GInput(GInputDevice* Device, GInputSemantic Semantic, GInputState State, GInputType Type);
							~GInput();

		GInputType			GetType() const;
		GInputState			GetState() const;
		GInputSemantic		GetSemantic() const;
		GInputDevice*		GetDevice() const;
	};

}

#endif